Puyo Puyo Fever GBA

A lot of text in the game is in the form of images. Use LZ77Restructor to extract and edit those. The rest needs both an edited font and a good understanding of how text works in this game.


Pointers?: 0x7421C
Unknown: 0x510C90
Start of graphics data: 0x519C0C
Dialogue: Around 0x83### or so. Layout still kinda undetermined. Text map still a WIP.
	Example text: "Oh, me. Try facing off with me." Found at 0x83970.
The text strings, whether they're for a single menu screen, or Manzai, come in the order they appear in the in-game language selection screen when first booting the game.



Example of pointer:
At offset 0x7FDF4, we have the bytes 90 FD 07 08, or 0x07FD90.
Pointer length still needs to be found, unless FFFF is meant to be the terminator byte pair? That seems to be the case!

In the beginning of a block of text:
The first two bytes (after FFFF) are the length of the block of text in pairs of bytes.
After that:
First pair of bytes is difference in byte pairs from last block before FF, and then from last text buffer. Only the first one is functional.
Second pair is difference from start of first block of text. All are functional.
Continue until 0F00.




How the text map was found: On working RAM address 0x02006658, the beginning of the line the game draws text from is marked in three bytes. e.g. If it says 6A 39 08, the line starts on 0x08396A.
Text Map (WIP, only looking for English characters at first. Foreign ones (Spanish, Italian, etc.) could still end up handy for Tonos and Dialytika, unless dakutens can be used as well. It all depends on how it's all set up.)

(NOTE: This charmap sucks. I made a more comprehensive one, and one that actually works with hex editors, later down the line. Use the below one only as a guideline of sorts.)

A - B700 (I got close. :P)
B - B800
C - B900
F - BC00
G - BD00
H - BE00
M - C200 (Guess from reading translations.)
O - C400
P - C500
R - C700
T - C900 (Does this mean the A is B500? Need to verify.)
U - CA00 (Guess from reading Spanish/Italian translation.)
W - CC00
(Guesses)
X - CD00
Y - CE00
Z - CF00
(Guesses end)

a - D000
b - D100
c - D200
d - D300
e - D400
f - 1501 (Did they forget this character?)
g - D500
h - D600
i - 2A01
j - D700
k - D800
l - 2B01
m - D900
n - DA00
o - DB00
p - DC00
q - DD00
r - 1601
s - DE00
t - 1701
u - DF00
v - E000
w - E100
x - E200
y - E300
z - E400 (Guess)

Space - 0080
Return - 0081
' - 1B01
, - 1901
. - 1801
… - 3B01 (Japanese ellipsis)
? - EF00
! - 1C01
End of line - 0081 (Usually followed by two FFs. A byte before it has a small number. Is it a pause? Could the two FFs be the end of line?)
Start of text - 0986 or 0B86, both seem to be used. ##86 seems to mark this in general. Are these two bytes an index number?
Pause - ##83, the number of the top byte is equal to a measure of time that needs to be measured. Possibly frames, or a multiple.

Sometimes, certain bytes seem to tell the script to do a certain animation, or change a character sprite accordingly.
For example, before the line "Nice job! Okay then, your next test will be...", the following sequence of bytes appears:
06 82 0E 84 0B 86
The byte before 82 signifies the color of the drawn dialogue. 06 is Accord cyan. 04 is Popoi purple.
The byte before 84 signifies the speed the text is drawn. 0C is 4 frames/character, while 18 is 2 frames/character.
The byte before 86 signifies the speaker's title in the textbox. These are graphics instead of actual text.

Empty data starts at 0x796cA0. It contains over 400 KBs of free space to add new data to.

Speed and Delay
Speed (XX84) and Delay (XX83) work by taking the value of the first byte, and using it as a comparator in a division with 1. As such, the higher the value, the lower the delay before the next action. If it's zero, any action is instant.

Animations
Each cutscene has a set number of animations that can play. These are triggered with the XX87 byte pair. 0087 will play the first animation, 0187 the second one, and so on. Usually, there's only a handful of animations per cutscene. This has limited function, and is only used when necessary in the middle of a sub-block of text or phrase. Otherwise, animations are usually triggered by the start of a sub-block of text.